import http from "../utils/request"

// 登录
export function login(data) {
	return http.request({
		url: '/login',
		method: 'post',
		data
	})
}

// 注册
export function register(data) {
	return http.request({
		url: '/register',
		method: 'post',
		data
	})
}

// 注销
export function logout(header) {
	return http.request({
		url: '/logout',
		method: 'post',
		header,
		dataType: 'json'
	})
}

// 修改密码
export function resetPassword(header,data) {
	return http.request({
		url: '/resetPassword',
		method: 'post',
		header,
		data
	})
}

// 找回密码
export function retrievePassword(data){
	return http.request({
		url: '/retrievePassword',
		method: 'post',
		data
	})
}

// 刷新token 
export function refreshToken(data){
	return http.request({
		url:'/refreshToken',
		method: 'post',
		data
	})
}